package ru.stepuk.modern;

import ru.stepuk.modern.nodes.Node;
import edu.uci.ics.jung.visualization.VisualizationViewer;
import ru.stepuk.modern.gui.MainFrame;

/**
 *
 * @author ivan
 */
public class Application {

    private Controller controller;
    private VisualizationViewer<Node, Path> visualizer;

    public Application(Controller controller, VisualizationViewer<Node, Path> visualizer) {
        this.controller = controller;
        this.visualizer = visualizer;
    }

    public void launch() {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MainFrame(controller, visualizer).setVisible(true);
            }
        });
    }
}
